//
// Created by Administrator on 2021/11/11.
// May Saint Diana bless you!
//
#include <iostream>
#include <vector>
#include <unordered_map>
#include <set>

using namespace std;

class Solution {
public:
    vector<int> findingUsersActiveMinutes(vector<vector<int>> &logs, int k) {
        vector<int> ans(k, 0);
        unordered_map<int, set<int>> counter;
        for (const auto &log:logs) {
            counter[log[0]].insert(log[1]);
        }
        for (auto &log:counter) {
            ans[log.second.size()-1]++;
        }
        return ans;
    }
};

int main() {
    vector<vector<int>> logs{{0, 5},
                             {1, 2},
                             {0, 2},
                             {0, 5},
                             {1, 3}};
    Solution solution;
    auto ans = solution.findingUsersActiveMinutes(logs, 5);
    for (const auto &x:ans) cout << x << endl;
    return 0;
}


